package com.eleventwelve.iris.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.opentides.bean.BaseEntity;
/**
 * 
 * @author Ashley
 *
 */
@Entity
@Table(name="PRESCRIBED_MEDICINE")
public class PrescribedMedicine extends BaseEntity{
	private static final long serialVersionUID = -8502196127645314790L;

	@ManyToOne
	@JoinColumn(name="PRESCRIPTION_ID")
	private Prescription prescription;
	
	@ManyToOne
	@JoinColumn(name="MEDICINE_ID")
	private Medicine medicine;
	
	@Column(name="DOSAGE")
	private String dosage;
	
	@Transient
	private transient boolean isDeleted;
	
	public Medicine getMedicine() {
		return medicine;
	}

	public void setMedicine(Medicine medicine) {
		this.medicine = medicine;
	}

	public String getDosage() {
		return dosage;
	}

	public void setDosage(String dosage) {
		this.dosage = dosage;
	}

	public Prescription getPrescription() {
		return prescription;
	}

	public void setPrescription(Prescription prescription) {
		this.prescription = prescription;
	}

	public boolean getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(boolean isDeleted) {
		this.isDeleted = isDeleted;
	}
	
}
